In the diagram, $AOB$ is a sector of a circle with $\angle AOB=60^\circ.$ $OY$ is drawn perpendicular to $AB$ and intersects $AB$ at $X.$  What is the length of $XY
?$ [asy]
draw((0,0)--(12,0),black+linewidth(1));
draw((0,0)--(10.3923,-6)..(12,0)..(10.3923,6)--(0,0),black+linewidth(1));
draw((10.3923,-6)--(10.3923,6),black+linewidth(1));
label("$O$",(0,0),W);
label("$A$",(10.3923,6),N);
label("$B$",(10.3923,-6),S);
label("$X$",(10.3923,0),NW);
label("$Y$",(12,0),E);
label("12",(0,0)--(10.3923,6),NW);
label("12",(0,0)--(10.3923,-6),SW);
[/asy]
Answer: Since $OY$ is a radius of the circle with centre $O,$ we have $OY=12.$ To find the length of $XY,$ we must find the length of $OX.$

Since $OA=OB,$ we know that $\triangle OAB$ is isosceles.

Since $\angle AOB = 60^\circ,$ we have $$\angle OAB=\frac{1}{2}(180^\circ-60^\circ)=60^\circ.$$ Therefore, $$
\angle AOX = 180^\circ-60^\circ-90^\circ
=30^\circ,
$$ so $\triangle OAX$ is a $30^\circ$-$60^\circ$-$90^\circ$ triangle.

Since $OA=12,$ we have $AX = \frac{1}{2}OA=6$ and $OX = \sqrt{3}AX=6\sqrt{3}.$ Thus, $$XY=OY-OX = \boxed{12 - 6\sqrt{3}} \approx 1.61.$$